﻿#region Using Directives

    using System;

    using Csla;

    using MarketPulse.BusinessLogic.Core;
    using MarketPulse.BusinessLogic.Common.Criteria;

#endregion

namespace MarketPulse.BusinessLogic.Common
{
    /// <summary>
    /// This class represents a collection of read-only EnquiryActionTypes
    /// </summary>
    [Serializable]
    [Csla.Server.ObjectFactory("MarketPulse.DataAccess.Factory.EnquiryFactory, MarketPulse.DataAccess.Factory", "FetchActionTypeInfoList")]
    public class EnquiryActionTypeInfoList : MarketPulseReadOnlyListBase<EnquiryActionTypeInfoList, EnquiryActionTypeInfo>
    {

        #region Constructors

            /// <summary>
            /// Default constructor is private in order to (try to) enforce construction
            /// only via the static factory methods provided.
            /// </summary>
            private EnquiryActionTypeInfoList()
            {
            }

        #endregion

        #region Methods

            #region Factory Methods

                ///// <summary>
                ///// Method used to get a read only list of read only EnquiryActionTypes that are associated with a particular Profile (via the DataPortal client proxy)
                ///// </summary>
                ///// <param name="profileGuid">The Profile Guid used to retrieve the EnquiryActionTypeInfoList</param>
                ///// <returns>A populated read only list of EnquiryActionTypes</returns>
                //public static EnquiryActionTypeInfoList GetByProfileGUID(Guid profileGuid)
                //{
                //    return DataPortal.Fetch<EnquiryActionTypeInfoList>(new ProfileGUIDCriteria(profileGuid));
                //}

                /// <summary>
                /// Method used to get a read only list of read only EnquiryActionTypes that are associated with a particular Client (via the DataPortal client proxy)
                /// </summary>
                /// <param name="clientGuid">The guid of the client to retrieve this list for</param>
                /// <returns>A valid (populated) list of EnquiryActionType objects</returns>
                public static EnquiryActionTypeInfoList GetByClientGUID(Guid clientGuid)
                {
                    return DataPortal.Fetch<EnquiryActionTypeInfoList>(new SingleCriteria<Guid>(clientGuid));
                }

            #endregion

        #endregion
    }
}
